<include file="Public:header" />
<script type="text/javascript" src="{$APP_PATH}/resources/scripts/region.js"></script>
<script type="text/javascript" src="{$APP_PATH}/resources/scripts/jq_area.js"></script>
<div class="container">
	<div class="page-header">
		<h4>{$knowledge.title}</h4>
	</div>
	<div class="row">
		<div class="span12">
			<include file="Public:alert" />
			<input type="hidden" name="knowledge_id" value="{$knowledge.knowledge_id}"/>
				<table class="table" width="95%" border="0" cellspacing="1" cellpadding="0">
					<thead>
						<tr>
							<td><a class="btn btn-primary" href="{:U('knowledge/edit','id='.$knowledge['knowledge_id'])}">{:L('EDIT')}</a>&nbsp; <a class="btn btn-primary" href="{:U('knowledge/delete','id='.$knowledge['knowledge_id'])}" id="isdelete">{:L('DELETE')}</a>&nbsp; <a class="btn" href="javascript:history.go(-1)">{:L('RETURN')}</a></td>
						</tr>
					</thead>
					<tbody width="100%">
						<tr><th>{:L('BASIC_INFO')}</th></tr>
						<tr><td>						
						<notempty name="knowledge.owner.user_name">{:L('AUTHORS')}：&nbsp;<a class="role_info" rel="{$knowledge.owner.role_id}" href="javascript:void(0)">{$knowledge.owner.user_name}</a></notempty>
						&nbsp;&nbsp;&nbsp;&nbsp;<notempty name="knowledge.update_time">{:L('TIMES')}{$knowledge.update_time|date="Y-m-d",###}<notempty>
						</td>
						</tr>
						<tr><td>{$knowledge.content}</td></tr>
					</tbody>
				</table>
		</div>
	</div>
</div>
<div class="hide" id="dialog-role-info" title="{:L('DIALOG_USER_INFO')}">loading...</div>
<script type="text/javascript">
$("#dialog-transform").dialog({
    autoOpen: false,
    modal: true,
	width: 600,
	position: ["center",100],
	maxHeight: 400,
	buttons: {
		"Ok": function () {
			$("#transform").submit();
			$(this).dialog("close");
		},
		"Cancel": function () {
			$(this).dialog("close");
		}
	}
});
$("#isdelete").click(function(){
	if(!confirm("{:L('ARE_YOU_SRUE_DELETE')}")){
		return false;
	}
})
$("#dialog-role-info").dialog({
    autoOpen: false,
    modal: true,
	width: 600,
	maxHeight: 400,
	position: ["center",100]
});
$(function(){
	$(".role_info").click(function(){
		$role_id = $(this).attr('rel');
		$('#dialog-role-info').dialog('open');
		$('#dialog-role-info').load('{:U("user/dialoginfo","id=")}'+$role_id);
	});
});
</script>
<include file="Public:footer" />